package com.googlecode.objectify.generic;

import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.memcache.ErrorHandler;
import com.google.appengine.api.memcache.MemcacheService;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 *
 * @author Secondary User
 */
public class NullMemcacheService implements MemcacheService
{

	@Override
	public Long increment(Object cacheKey, int i)
	{
		return 1L;
	}

	@Override
	public Long increment(Object cacheKey, int i, Long lastValue)
	{
		return lastValue + 1;
	}

	@Override
	public void setErrorHandler(ErrorHandler handler)
	{
	}

	@Override
	public <T> Map<T, MemcacheService.IdentifiableValue> getIdentifiables(Set<T> potentials)
	{
		return new HashMap<T, MemcacheService.IdentifiableValue>();
	}

	@Override
	public void putAll(Map<?, Object> cold)
	{
	}

	@Override
	public <T> Set<T> putIfUntouched(Map<T, MemcacheService.CasValues> payload)
	{
		return new HashSet<T>();
	}

	@Override
	public <T> Map<T, Object> getAll(Collection<T> keys)
	{
		return new HashMap<T, Object>();
	}

	@Override
	public <T> Set<T> deleteAll(Collection<T> keys)
	{
		return new HashSet<T>();
	}

	@Override
	public void put(Object childKey, Object ent)
	{
	}

	@Override
	public Object get(Object key)
	{
		return null;
	}
}
